import request from '@/config/axios'

/*****************************邮箱配置****************************** */

// 查询 分页
export const getmailServerConfigPage = (params) => {
  return request.get({ url: '/mailServerConfig/list', params })
}

// 删除
export const deletemailServerConfig = (data) => {
  return request.post({ url: '/mailServerConfig/delete',data })
}

// 新增/修改
export const savemailServerConfig = (data) => {
  return request.post({ url: '/mailServerConfig/saveOrUpdate',data })
}
// 更新状态
export const updatemailServerConfigValid = (data) => {
  return request.post({ url: '/mailServerConfig/isValid',data })
}

// 详情
export const getByIdmailServerConfig = (params) => {
  return request.get({ url: '/mailServerConfig/getById',params })
}

/*****************************邮箱发布规则****************************** */

// 查询 分页
export const getmailNoticeRulePage = (params: PageParam) => {
  return request.get({ url: '/mailNoticeRule/list', params })
}

// 删除
export const deletemailNoticeRule = (data) => {
  return request.post({ url: '/mailNoticeRule/delete',data })
}

// 新增/修改
export const savemailNoticeRule = (data) => {
  return request.post({ url: '/mailNoticeRule/saveOrUpdate',data })
}
// 更新状态
export const updatemailNoticeRuleValid = (data) => {
  return request.post({ url: '/mailNoticeRule/isValid',data })
}

// 详情
export const getByIdmailNoticeRule = (params) => {
  return request.get({ url: '/mailNoticeRule/getById',params })
}